﻿<UserControl x:Class="CubeExercise.CubeControl"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:Cube="clr-namespace:CubeExercise"
    Background="Black" Width="386" Height="290" MaxHeight="290" MaxWidth="386" MinHeight="290" MinWidth="386">

    <Grid Margin="1" Width="384" Height="288">
        <Grid.RowDefinitions>
            <RowDefinition />
            <RowDefinition />
            <RowDefinition />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition />
            <ColumnDefinition />
            <ColumnDefinition />
            <ColumnDefinition />
        </Grid.ColumnDefinitions>
        <Cube:CubeSurface x:Name="Back" Grid.Row="0" Grid.Column="1">
            <Control.RenderTransform>
                <TransformGroup>
                    <RotateTransform Angle="180" />
                    <TranslateTransform X="96" Y="96" />
                </TransformGroup>
            </Control.RenderTransform>
        </Cube:CubeSurface>
        <Cube:CubeSurface x:Name="Up" Grid.Row="1" Grid.Column="1"/>
        <Cube:CubeSurface x:Name="Left" Grid.Row="1" Grid.Column="0">
            <Control.RenderTransform>
                <TransformGroup>
                    <RotateTransform Angle="90" />
                    <TranslateTransform X="96" Y="0" />
                </TransformGroup>
            </Control.RenderTransform>
        </Cube:CubeSurface>
        <Cube:CubeSurface x:Name="Right" Grid.Row="1" Grid.Column="2">
            <Control.RenderTransform>
                <TransformGroup>
                    <RotateTransform Angle="270" />
                    <TranslateTransform X="0" Y="96" />
                </TransformGroup>
            </Control.RenderTransform>
        </Cube:CubeSurface>
        <Cube:CubeSurface x:Name="Front" Grid.Row="2" Grid.Column="1"/>
        <Cube:CubeSurface x:Name="Down" Grid.Row="1" Grid.Column="3">
            <Control.RenderTransform>
                <TransformGroup>
                    <RotateTransform Angle="180" />
                    <TranslateTransform X="96" Y="96" />
                </TransformGroup>
            </Control.RenderTransform>
        </Cube:CubeSurface>
    </Grid>
</UserControl>
